package com.example.publishDemo.Model;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;


public class Comment {
    private int c_id;
    private String content;
    private String username;
    private String user_gravatar;
    private int u_id;
    private int r_id;
    private int p_id;
    private String target;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createtime;

    public List<Comment> getChildren() {
        return children;
    }

    public void setChildren(List<Comment> children) {
        this.children = children;
    }

    private List<Comment> children;

    public Comment() {

    }

    public Comment(int c_id, String content, String username, String user_gravatar, int u_id, int r_id, int p_id, String target, LocalDateTime createtime) {
        this.c_id = c_id;
        this.content = content;
        this.username = username;
        this.user_gravatar = user_gravatar;
        this.u_id = u_id;
        this.r_id = r_id;
        this.p_id = p_id;
        this.target = target;
        this.createtime = createtime;
    }

    public int getC_id() {
        return c_id;
    }

    public void setC_id(int c_id) {
        this.c_id = c_id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUser_gravatar() {
        return user_gravatar;
    }

    public void setUser_gravatar(String user_gravatar) {
        this.user_gravatar = user_gravatar;
    }

    public int getU_id() {
        return u_id;
    }

    public void setU_id(int u_id) {
        this.u_id = u_id;
    }

    public int getR_id() {
        return r_id;
    }

    public void setR_id(int r_id) {
        this.r_id = r_id;
    }

    public int getP_id() {
        return p_id;
    }

    public void setP_id(int p_id) {
        this.p_id = p_id;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public LocalDateTime getCreatetime() {
        return createtime;
    }

    public void setCreatetime(LocalDateTime createtime) {
        this.createtime = createtime;
    }
}
